import request from '@/utils/request'
// 登录
export function login(userId, password) {
  return request({
    url: '/web/core/login',
    method: 'post',
    data: {
      userId,
      password
    }
  })
}


// 获取权限数组 
export function getInfo() {
  return request({
    url: '/web/tRolePermission/getPerMenu',
    method: 'get'
  })
}


// 用户登录返回示例
/*{
  "code": 2000,
  "data": {
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjdXJyZW50VGltZU1pbGxpcyI6IjE1NzM3MDQxNDUxODMiLCJ1c2VyVHlwZSI6IjAiLCJhY2NvdW50IjoiYWRtaW4ifQ.g4fWXdimVn4JzRnXOt8gl2wy577QQlQBPrYLTAypKyE"
  },
  "msg": "success"
}*/

// 权限数组返回示例
/*{
  "code": 2000,
  "data": {
    "allPer": [
      "permission_select",
      "menu_select",
      "role_select",
      "role_add",
      "role_edit",
      "role_del",
      "user_select",
      "user_add",
      "uesr_edit",
      "user_del",
      "stu_select",
      "tea_select",
      "sch_select",
      "sch_add",
      "sch_edit",
      "sch_del",
      "group_select",
      "group_add",
      "group_edit",
      "group_del",
      "areclass_select",
      "areclass_add",
      "areclass_edit",
      "areclass_del",
      "schclass_select",
      "term_select",
      "term_add",
      "term_edit",
      "term_del",
      "rili_select",
      "myreslist_select",
      "mypreview_select",
      "tea_log"
    ]
  },
  "msg": "success"
}*/


// 左侧菜单返回示例
/*{
  "code": 2000,
  "data": [
    {
      "id": 1,
      "pid": -2,
      "meta": {
        "title": "系统管理",
        "icon": "setting",
        "requireAuth": true
      },
      "path": "/system",
      "name": "系统管理",
      "component": "Layout",
      "children": [
        {
          "id": 2,
          "pid": 1,
          "meta": {
            "title": "权限管理",
            "icon": "unlock",
            "requireAuth": true
          },
          "path": "permission",
          "name": "权限管理",
          "component": "system/permission/index",
          "children": []
        },
        {
          "id": 3,
          "pid": 1,
          "meta": {
            "title": "角色管理",
            "icon": "team",
            "requireAuth": true
          },
          "path": "role",
          "name": "角色管理",
          "component": "system/role/index",
          "children": []
        },
        {
          "id": 6,
          "pid": 1,
          "meta": {
            "title": "菜单管理",
            "icon": "menu",
            "requireAuth": true
          },
          "path": "menu",
          "name": "菜单管理",
          "component": "system/menu/index",
          "children": []
        },
        {
          "id": 146,
          "pid": 1,
          "meta": {
            "title": "数据同步",
            "icon": "shujukanban",
            "requireAuth": true
          },
          "path": "same",
          "name": "数据同步",
          "component": "system/same/index",
          "children": []
        }
      ]
    },
    {
      "id": 51,
      "pid": -2,
      "meta": {
        "title": "学校信息",
        "icon": "id card",
        "requireAuth": true
      },
      "path": "/schinfo",
      "name": "学校信息",
      "component": "Layout",
      "children": [
        {
          "id": 59,
          "pid": 51,
          "meta": {
            "title": "课表日历",
            "icon": "table",
            "requireAuth": true
          },
          "path": "rili",
          "name": "课表日历",
          "component": "schinfo/rili/index",
          "children": []
        },
        {
          "id": 60,
          "pid": 51,
          "meta": {
            "title": "课表明细",
            "icon": "block",
            "requireAuth": true
          },
          "path": "classdetail",
          "name": "课表明细",
          "component": "schinfo/classdetail/index",
          "children": []
        },
        {
          "id": 61,
          "pid": 51,
          "meta": {
            "title": "学校管理",
            "icon": "gold",
            "requireAuth": true
          },
          "path": "schlist",
          "name": "学校管理",
          "component": "schinfo/schlist/index",
          "children": []
        },
        {
          "id": 62,
          "pid": 51,
          "meta": {
            "title": "校群管理",
            "icon": "addteam",
            "requireAuth": true
          },
          "path": "groupadm",
          "name": "校群管理",
          "component": "schinfo/groupadm/index",
          "children": []
        },
        {
          "id": 63,
          "pid": 51,
          "meta": {
            "title": "区互动教室",
            "icon": "customerservice",
            "requireAuth": true
          },
          "path": "classroomlist",
          "name": "区互动教室",
          "component": "schinfo/classroomlist/index",
          "children": []
        },
        {
          "id": 103,
          "pid": 51,
          "meta": {
            "title": "校互动教室",
            "icon": "guanlsb",
            "requireAuth": true
          },
          "path": "schclass",
          "name": "校互动教室",
          "component": "schinfo/classroomlist/schclass",
          "children": []
        },
        {
          "id": 115,
          "pid": 51,
          "meta": {
            "title": "学期管理",
            "icon": "detail",
            "requireAuth": true
          },
          "path": "term",
          "name": "学期管理",
          "component": "schinfo/term/index",
          "children": []
        },
        {
          "id": 127,
          "pid": 51,
          "meta": {
            "title": "教师调度",
            "icon": "export",
            "requireAuth": true
          },
          "path": "dispatch",
          "name": "教师调度",
          "component": "schinfo/dispatch/index",
          "children": []
        },
        {
          "id": 148,
          "pid": 51,
          "meta": {
            "title": "网端教室",
            "icon": "appstore-add",
            "requireAuth": true
          },
          "path": "breast",
          "name": "网端教室",
          "component": "schinfo/breast/index",
          "children": []
        }
      ]
    },
    {
      "id": 53,
      "pid": -2,
      "meta": {
        "title": "统计管理",
        "icon": "bar-chart",
        "requireAuth": true
      },
      "path": "/echarts",
      "name": "统计管理",
      "component": "Layout",
      "children": [
        {
          "id": 55,
          "pid": 53,
          "meta": {
            "title": "课时图表",
            "icon": "add_tupian",
            "requireAuth": true
          },
          "path": "hourchar",
          "name": "课时图表",
          "component": "echarts/hourchar/index",
          "children": []
        },
        {
          "id": 56,
          "pid": 53,
          "meta": {
            "title": "统计明细",
            "icon": "area-chart",
            "requireAuth": true
          },
          "path": "statdeta",
          "name": "统计明细",
          "component": "echarts/statdeta/index",
          "children": []
        },
        {
          "id": 57,
          "pid": 53,
          "meta": {
            "title": "登录日志",
            "icon": "bar-chart",
            "requireAuth": true
          },
          "path": "loginlog",
          "name": "登录日志",
          "component": "echarts/loginlog/index",
          "children": []
        },
        {
          "id": 147,
          "pid": 53,
          "meta": {
            "title": "打卡记录",
            "icon": "app-store",
            "requireAuth": true
          },
          "path": "clocklog",
          "name": "打卡记录",
          "component": "echarts/clocklog/index",
          "children": []
        }
      ]
    },
    {
      "id": 64,
      "pid": -2,
      "meta": {
        "title": "平台审核",
        "icon": "credit-card",
        "requireAuth": true
      },
      "path": "/plataudit",
      "name": "平台审核",
      "component": "Layout",
      "children": [
        {
          "id": 65,
          "pid": 64,
          "meta": {
            "title": "学校资源",
            "icon": "appstore-add",
            "requireAuth": true
          },
          "path": "resaudit",
          "name": "学校资源",
          "component": "plataudit/resaudit/index",
          "children": []
        },
        {
          "id": 141,
          "pid": 64,
          "meta": {
            "title": "调度审核",
            "icon": "user_lock",
            "requireAuth": true
          },
          "path": "audit",
          "name": "调度审核",
          "component": "plataudit/audit/index",
          "children": []
        },
        {
          "id": 142,
          "pid": 64,
          "meta": {
            "title": "区域审核",
            "icon": "eye-open",
            "requireAuth": true
          },
          "path": "topass",
          "name": "区域审核",
          "component": "plataudit/topass/index",
          "children": []
        }
      ]
    },
    {
      "id": 72,
      "pid": -2,
      "meta": {
        "title": "用户管理",
        "icon": "add-user",
        "requireAuth": true
      },
      "path": "/usermanage",
      "name": "用户管理",
      "component": "Layout",
      "children": [
        {
          "id": 7,
          "pid": 72,
          "meta": {
            "title": "区域用户",
            "icon": "add-user",
            "requireAuth": true
          },
          "path": "userarea",
          "name": "区域用户",
          "component": "system/user/index",
          "children": []
        },
        {
          "id": 73,
          "pid": 72,
          "meta": {
            "title": "学生用户",
            "icon": "addteam",
            "requireAuth": true
          },
          "path": "userstu",
          "name": "学生用户",
          "component": "usermanage/userstu/index",
          "children": []
        },
        {
          "id": 74,
          "pid": 72,
          "meta": {
            "title": "老师用户",
            "icon": "user_lock",
            "requireAuth": true
          },
          "path": "index",
          "name": "老师用户",
          "component": "usermanage/usertea/index",
          "children": []
        }
      ]
    },
    {
      "id": 75,
      "pid": -2,
      "meta": {
        "title": "系统监控",
        "icon": "point-map",
        "requireAuth": true
      },
      "path": "/monitor",
      "name": "系统监控",
      "component": "Layout",
      "children": [
        {
          "id": 76,
          "pid": 75,
          "meta": {
            "title": "操作日志",
            "icon": "file-search",
            "requireAuth": true
          },
          "path": "logs",
          "name": "操作日志",
          "component": "monitor/logs/index",
          "children": []
        }
      ]
    },
    {
      "id": 128,
      "pid": -2,
      "meta": {
        "title": "我的资源",
        "icon": "cloud-upload",
        "requireAuth": true
      },
      "path": "/resources",
      "name": "我的资源",
      "component": "Layout",
      "children": [
        {
          "id": 130,
          "pid": 128,
          "meta": {
            "title": "资源中心",
            "icon": "detail",
            "requireAuth": true
          },
          "path": "myreslist",
          "name": "资源中心",
          "component": "resources/myreslist/index",
          "children": []
        }
      ]
    }
  ],
  "msg": "success"
}*/